package com.ama.dao;

import com.ama.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserDao {
    @Select("select *from user where id = #{id}")
    public User getUserById(@Param("id") int id);

    @Update("update user set name=#{name}, password=#{password} where id =#{id}")
    public void updateUser(User user);
}
